<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span id="local-6989586621679656641"><span id="local-6989586621679656642"></span></span><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveGeneric      #-}</span><span>
</span><span id="line-3"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Types.PackageVersionConstraint</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-4"></span><span>    </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier">PackageVersionConstraint</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#thisPackageVersionConstraint"><span class="hs-identifier">thisPackageVersionConstraint</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#simplifyPackageVersionConstraint"><span class="hs-identifier">simplifyPackageVersionConstraint</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-8"></span><span>
</span><span id="line-9"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html"><span class="hs-identifier">Distribution.Types.PackageId</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.PackageName.html"><span class="hs-identifier">Distribution.Types.PackageName</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html"><span class="hs-identifier">Distribution.Types.Version</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html"><span class="hs-identifier">Distribution.Types.VersionRange.Internal</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>                     </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Version.html#simplifyVersionRange"><span class="hs-identifier">simplifyVersionRange</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Compat.CharParsing.html"><span class="hs-identifier">Distribution.Compat.CharParsing</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">P</span></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-comment">-- | A version constraint on a package. Different from 'ExeDependency' and</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- 'Dependency' since it does not specify the need for a component, not even</span><span>
</span><span id="line-24"></span><span class="hs-comment">-- the main library.</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- There are a few places in the codebase where 'Dependency' was used where</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- 'PackageVersionConstraint' is not used instead (#5570).</span><span>
</span><span id="line-27"></span><span id="local-6989586621679656636"><span id="local-6989586621679656637"></span></span><span class="hs-keyword">data</span><span> </span><span id="PackageVersionConstraint"><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-var">PackageVersionConstraint</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="PackageVersionConstraint"><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-var">PackageVersionConstraint</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.PackageName.html#PackageName"><span class="hs-identifier hs-type">PackageName</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span>
</span><span id="line-28"></span><span>                  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(forall x.
 PackageVersionConstraint -&gt; Rep PackageVersionConstraint x)
-&gt; (forall x.
    Rep PackageVersionConstraint x -&gt; PackageVersionConstraint)
-&gt; Generic PackageVersionConstraint
forall x.
Rep PackageVersionConstraint x -&gt; PackageVersionConstraint
forall x.
PackageVersionConstraint -&gt; Rep PackageVersionConstraint x
forall a.
(forall x. a -&gt; Rep a x) -&gt; (forall x. Rep a x -&gt; a) -&gt; Generic a
$cto :: forall x.
Rep PackageVersionConstraint x -&gt; PackageVersionConstraint
$cfrom :: forall x.
PackageVersionConstraint -&gt; Rep PackageVersionConstraint x
</span><a href="../../base/src/GHC.Generics.html#Generic"><span class="hs-identifier hs-var hs-var hs-var hs-var">Generic</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679656614"><span id="local-6989586621679656625"><span id="local-6989586621679656628"><span id="local-6989586621679656630"><span class="annot"><span class="annottext">ReadPrec [PackageVersionConstraint]
ReadPrec PackageVersionConstraint
Int -&gt; ReadS PackageVersionConstraint
ReadS [PackageVersionConstraint]
(Int -&gt; ReadS PackageVersionConstraint)
-&gt; ReadS [PackageVersionConstraint]
-&gt; ReadPrec PackageVersionConstraint
-&gt; ReadPrec [PackageVersionConstraint]
-&gt; Read PackageVersionConstraint
forall a.
(Int -&gt; ReadS a)
-&gt; ReadS [a] -&gt; ReadPrec a -&gt; ReadPrec [a] -&gt; Read a
readListPrec :: ReadPrec [PackageVersionConstraint]
$creadListPrec :: ReadPrec [PackageVersionConstraint]
readPrec :: ReadPrec PackageVersionConstraint
$creadPrec :: ReadPrec PackageVersionConstraint
readList :: ReadS [PackageVersionConstraint]
$creadList :: ReadS [PackageVersionConstraint]
readsPrec :: Int -&gt; ReadS PackageVersionConstraint
$creadsPrec :: Int -&gt; ReadS PackageVersionConstraint
</span><a href="../../base/src/GHC.Read.html#Read"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Read</span></a></span></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679656600"><span id="local-6989586621679656602"><span id="local-6989586621679656610"><span class="annot"><span class="annottext">Int -&gt; PackageVersionConstraint -&gt; ShowS
[PackageVersionConstraint] -&gt; ShowS
PackageVersionConstraint -&gt; String
(Int -&gt; PackageVersionConstraint -&gt; ShowS)
-&gt; (PackageVersionConstraint -&gt; String)
-&gt; ([PackageVersionConstraint] -&gt; ShowS)
-&gt; Show PackageVersionConstraint
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [PackageVersionConstraint] -&gt; ShowS
$cshowList :: [PackageVersionConstraint] -&gt; ShowS
show :: PackageVersionConstraint -&gt; String
$cshow :: PackageVersionConstraint -&gt; String
showsPrec :: Int -&gt; PackageVersionConstraint -&gt; ShowS
$cshowsPrec :: Int -&gt; PackageVersionConstraint -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679656591"><span id="local-6989586621679656597"><span class="annot"><span class="annottext">PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool
(PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool)
-&gt; (PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool)
-&gt; Eq PackageVersionConstraint
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool
$c/= :: PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool
== :: PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool
$c== :: PackageVersionConstraint -&gt; PackageVersionConstraint -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679656554"><span id="local-6989586621679656556"><span id="local-6989586621679656558"><span id="local-6989586621679656560"><span id="local-6989586621679656562"><span id="local-6989586621679656564"><span id="local-6989586621679656566"><span id="local-6989586621679656568"><span id="local-6989586621679656570"><span id="local-6989586621679656572"><span id="local-6989586621679656574"><span id="local-6989586621679656576"><span id="local-6989586621679656580"><span id="local-6989586621679656586"><span class="annot"><span class="annottext">Typeable PackageVersionConstraint
Typeable PackageVersionConstraint
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g)
    -&gt; PackageVersionConstraint
    -&gt; c PackageVersionConstraint)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c PackageVersionConstraint)
-&gt; (PackageVersionConstraint -&gt; Constr)
-&gt; (PackageVersionConstraint -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d))
    -&gt; Maybe (c PackageVersionConstraint))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e))
    -&gt; Maybe (c PackageVersionConstraint))
-&gt; ((forall b. Data b =&gt; b -&gt; b)
    -&gt; PackageVersionConstraint -&gt; PackageVersionConstraint)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r)
    -&gt; r
    -&gt; (forall d. Data d =&gt; d -&gt; r')
    -&gt; PackageVersionConstraint
    -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r)
    -&gt; r
    -&gt; (forall d. Data d =&gt; d -&gt; r')
    -&gt; PackageVersionConstraint
    -&gt; r)
-&gt; (forall u.
    (forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; [u])
-&gt; (forall u.
    Int
    -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d)
    -&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint)
-&gt; Data PackageVersionConstraint
PackageVersionConstraint -&gt; DataType
PackageVersionConstraint -&gt; Constr
(forall b. Data b =&gt; b -&gt; b)
-&gt; PackageVersionConstraint -&gt; PackageVersionConstraint
forall a.
Typeable a
-&gt; (forall (c :: * -&gt; *).
    (forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
    -&gt; (forall g. g -&gt; c g) -&gt; a -&gt; c a)
-&gt; (forall (c :: * -&gt; *).
    (forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
    -&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c a)
-&gt; (a -&gt; Constr)
-&gt; (a -&gt; DataType)
-&gt; (forall (t :: * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d. Data d =&gt; c (t d)) -&gt; Maybe (c a))
-&gt; (forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
    Typeable t =&gt;
    (forall d e. (Data d, Data e) =&gt; c (t d e)) -&gt; Maybe (c a))
-&gt; ((forall b. Data b =&gt; b -&gt; b) -&gt; a -&gt; a)
-&gt; (forall r r'.
    (r -&gt; r' -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall r r'.
    (r' -&gt; r -&gt; r) -&gt; r -&gt; (forall d. Data d =&gt; d -&gt; r') -&gt; a -&gt; r)
-&gt; (forall u. (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; [u])
-&gt; (forall u. Int -&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; a -&gt; u)
-&gt; (forall (m :: * -&gt; *).
    Monad m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; (forall (m :: * -&gt; *).
    MonadPlus m =&gt;
    (forall d. Data d =&gt; d -&gt; m d) -&gt; a -&gt; m a)
-&gt; Data a
forall u.
Int
-&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; u
forall u.
(forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; [u]
forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r
-&gt; (forall d. Data d =&gt; d -&gt; r')
-&gt; PackageVersionConstraint
-&gt; r
forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r
-&gt; (forall d. Data d =&gt; d -&gt; r')
-&gt; PackageVersionConstraint
-&gt; r
forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c PackageVersionConstraint
forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; PackageVersionConstraint
-&gt; c PackageVersionConstraint
forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c PackageVersionConstraint)
forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c PackageVersionConstraint)
gmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
$cgmapMo :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
gmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
$cgmapMp :: forall (m :: * -&gt; *).
MonadPlus m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
gmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
$cgmapM :: forall (m :: * -&gt; *).
Monad m =&gt;
(forall d. Data d =&gt; d -&gt; m d)
-&gt; PackageVersionConstraint -&gt; m PackageVersionConstraint
gmapQi :: forall u.
Int
-&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; u
$cgmapQi :: forall u.
Int
-&gt; (forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; u
gmapQ :: forall u.
(forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; [u]
$cgmapQ :: forall u.
(forall d. Data d =&gt; d -&gt; u) -&gt; PackageVersionConstraint -&gt; [u]
gmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r
-&gt; (forall d. Data d =&gt; d -&gt; r')
-&gt; PackageVersionConstraint
-&gt; r
$cgmapQr :: forall r r'.
(r' -&gt; r -&gt; r)
-&gt; r
-&gt; (forall d. Data d =&gt; d -&gt; r')
-&gt; PackageVersionConstraint
-&gt; r
gmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r
-&gt; (forall d. Data d =&gt; d -&gt; r')
-&gt; PackageVersionConstraint
-&gt; r
$cgmapQl :: forall r r'.
(r -&gt; r' -&gt; r)
-&gt; r
-&gt; (forall d. Data d =&gt; d -&gt; r')
-&gt; PackageVersionConstraint
-&gt; r
gmapT :: (forall b. Data b =&gt; b -&gt; b)
-&gt; PackageVersionConstraint -&gt; PackageVersionConstraint
$cgmapT :: (forall b. Data b =&gt; b -&gt; b)
-&gt; PackageVersionConstraint -&gt; PackageVersionConstraint
dataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c PackageVersionConstraint)
$cdataCast2 :: forall (t :: * -&gt; * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d e. (Data d, Data e) =&gt; c (t d e))
-&gt; Maybe (c PackageVersionConstraint)
dataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c PackageVersionConstraint)
$cdataCast1 :: forall (t :: * -&gt; *) (c :: * -&gt; *).
Typeable t =&gt;
(forall d. Data d =&gt; c (t d)) -&gt; Maybe (c PackageVersionConstraint)
dataTypeOf :: PackageVersionConstraint -&gt; DataType
$cdataTypeOf :: PackageVersionConstraint -&gt; DataType
toConstr :: PackageVersionConstraint -&gt; Constr
$ctoConstr :: PackageVersionConstraint -&gt; Constr
gunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c PackageVersionConstraint
$cgunfold :: forall (c :: * -&gt; *).
(forall b r. Data b =&gt; c (b -&gt; r) -&gt; c r)
-&gt; (forall r. r -&gt; c r) -&gt; Constr -&gt; c PackageVersionConstraint
gfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; PackageVersionConstraint
-&gt; c PackageVersionConstraint
$cgfoldl :: forall (c :: * -&gt; *).
(forall d b. Data d =&gt; c (d -&gt; b) -&gt; d -&gt; c b)
-&gt; (forall g. g -&gt; c g)
-&gt; PackageVersionConstraint
-&gt; c PackageVersionConstraint
</span><a href="../../base/src/Data.Data.html#Data"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Data</span></a></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679656547"><span id="local-6989586621679656549"><span id="local-6989586621679656551"><span class="annot"><a href="../../binary/src/Data.Binary.Class.html#Binary"><span class="hs-identifier hs-type">Binary</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span></span></span></span><span>
</span><span id="line-31"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679656540"><span id="local-6989586621679656542"><span class="annot"><a href="Distribution.Utils.Structured.html#Structured"><span class="hs-identifier hs-type">Structured</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span></span></span><span>
</span><span id="line-32"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../deepseq/src/Control.DeepSeq.html#NFData"><span class="hs-identifier hs-type">NFData</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span> </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679656519"><span class="annot"><span class="annottext">rnf :: PackageVersionConstraint -&gt; ()
</span><a href="../../deepseq/src/Control.DeepSeq.html#rnf"><span class="hs-identifier hs-var hs-var hs-var hs-var">rnf</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageVersionConstraint -&gt; ()
forall a. (Generic a, GNFData (Rep a)) =&gt; a -&gt; ()
</span><a href="Distribution.Compat.Prelude.html#genericRnf"><span class="hs-identifier hs-var">genericRnf</span></a></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679656514"><span class="annot"><a href="Distribution.Pretty.html#Pretty"><span class="hs-identifier hs-type">Pretty</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-35"></span><span>  </span><span class="hs-comment">-- Cannot do: PackageVersionConstraint have to be parseable</span><span>
</span><span id="line-36"></span><span>  </span><span class="hs-comment">-- as Dependency, due roundtrip problems. (e.g. talking to old ./Setup).</span><span>
</span><span id="line-37"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-38"></span><span>  </span><span class="hs-comment">-- pretty (PackageVersionConstraint name (ThisVersion ver)) =</span><span>
</span><span id="line-39"></span><span>  </span><span class="hs-comment">--     pretty (PackageIdentifier name ver)</span><span>
</span><span id="line-40"></span><span>  </span><span id="local-6989586621679656508"><span class="annot"><span class="annottext">pretty :: PackageVersionConstraint -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var hs-var hs-var hs-var">pretty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span> </span><span id="local-6989586621679656506"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656506"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679656505"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679656505"><span class="hs-identifier hs-var">ver</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-41"></span><span>      </span><span class="annot"><span class="annottext">PackageName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656506"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679656505"><span class="hs-identifier hs-var">ver</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-44"></span><span class="hs-comment">--</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- &gt;&gt;&gt; simpleParsec &quot;foo&quot; :: Maybe PackageVersionConstraint</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- Just (PackageVersionConstraint (PackageName &quot;foo&quot;) (OrLaterVersion (mkVersion [0])))</span><span>
</span><span id="line-47"></span><span class="hs-comment">--</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- &gt;&gt;&gt; simpleParsec &quot;foo &gt;=2.0&quot; :: Maybe PackageVersionConstraint</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- Just (PackageVersionConstraint (PackageName &quot;foo&quot;) (OrLaterVersion (mkVersion [2,0])))</span><span>
</span><span id="line-50"></span><span class="hs-comment">--</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- &gt;&gt;&gt; simpleParsec &quot;foo-2.0&quot; :: Maybe PackageVersionConstraint</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- Just (PackageVersionConstraint (PackageName &quot;foo&quot;) (ThisVersion (mkVersion [2,0])))</span><span>
</span><span id="line-53"></span><span class="hs-comment">--</span><span>
</span><span id="line-54"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#Parsec"><span class="hs-identifier hs-type">Parsec</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-55"></span><span>  </span><span id="local-6989586621679656469"><span class="annot"><span class="annottext">parsec :: forall (m :: * -&gt; *). CabalParsing m =&gt; m PackageVersionConstraint
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var hs-var hs-var hs-var">parsec</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-56"></span><span>      </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span> </span><span id="local-6989586621679656466"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656466"><span class="hs-identifier hs-var">name</span></a></span></span><span> </span><span id="local-6989586621679656465"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679656465"><span class="hs-identifier hs-var">ver</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m PackageIdentifier
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span>
</span><span id="line-57"></span><span>      </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679656465"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="Distribution.Types.Version.html#nullVersion"><span class="hs-identifier hs-var">nullVersion</span></a></span><span>
</span><span id="line-58"></span><span>      </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-59"></span><span>          </span><span class="annot"><span class="annottext">m ()
forall (m :: * -&gt; *). CharParsing m =&gt; m ()
</span><a href="Distribution.Compat.CharParsing.html#spaces"><span class="hs-identifier hs-var">P.spaces</span></a></span><span>
</span><span id="line-60"></span><span>          </span><span id="local-6989586621679656462"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679656462"><span class="hs-identifier hs-var">vr</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m VersionRange
forall a (m :: * -&gt; *). (Parsec a, CabalParsing m) =&gt; m a
</span><a href="Distribution.Parsec.html#parsec"><span class="hs-identifier hs-var">parsec</span></a></span><span> </span><span class="annot"><span class="annottext">m VersionRange -&gt; m VersionRange -&gt; m VersionRange
forall (f :: * -&gt; *) a. Alternative f =&gt; f a -&gt; f a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var">&lt;|&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; m VersionRange
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span>
</span><span id="line-61"></span><span>          </span><span class="annot"><span class="annottext">m ()
forall (m :: * -&gt; *). CharParsing m =&gt; m ()
</span><a href="Distribution.Compat.CharParsing.html#spaces"><span class="hs-identifier hs-var">P.spaces</span></a></span><span>
</span><span id="line-62"></span><span>          </span><span class="annot"><span class="annottext">PackageVersionConstraint -&gt; m PackageVersionConstraint
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageName -&gt; VersionRange -&gt; PackageVersionConstraint
</span><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-var">PackageVersionConstraint</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656466"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679656462"><span class="hs-identifier hs-var">vr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span>      </span><span class="hs-keyword">else</span><span>
</span><span id="line-64"></span><span>          </span><span class="annot"><span class="annottext">PackageVersionConstraint -&gt; m PackageVersionConstraint
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageName -&gt; VersionRange -&gt; PackageVersionConstraint
</span><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-var">PackageVersionConstraint</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656466"><span class="hs-identifier hs-var">name</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#thisVersion"><span class="hs-identifier hs-var">thisVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679656465"><span class="hs-identifier hs-var">ver</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-65"></span><span>
</span><span id="line-66"></span><span class="hs-comment">-- | @since 3.4.0.0</span><span>
</span><span id="line-67"></span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#thisPackageVersionConstraint"><span class="hs-identifier hs-type">thisPackageVersionConstraint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span>
</span><span id="line-68"></span><span id="thisPackageVersionConstraint"><span class="annot"><span class="annottext">thisPackageVersionConstraint :: PackageIdentifier -&gt; PackageVersionConstraint
</span><a href="Distribution.Types.PackageVersionConstraint.html#thisPackageVersionConstraint"><span class="hs-identifier hs-var hs-var">thisPackageVersionConstraint</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span> </span><span id="local-6989586621679656458"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656458"><span class="hs-identifier hs-var">pn</span></a></span></span><span> </span><span id="local-6989586621679656457"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679656457"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-69"></span><span>    </span><span class="annot"><span class="annottext">PackageName -&gt; VersionRange -&gt; PackageVersionConstraint
</span><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-var">PackageVersionConstraint</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656458"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#thisVersion"><span class="hs-identifier hs-var">thisVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679656457"><span class="hs-identifier hs-var">vr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span class="hs-comment">-- | @since 3.4.0.0</span><span>
</span><span id="line-72"></span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#simplifyPackageVersionConstraint"><span class="hs-identifier hs-type">simplifyPackageVersionConstraint</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span>
</span><span id="line-73"></span><span id="simplifyPackageVersionConstraint"><span class="annot"><span class="annottext">simplifyPackageVersionConstraint :: PackageVersionConstraint -&gt; PackageVersionConstraint
</span><a href="Distribution.Types.PackageVersionConstraint.html#simplifyPackageVersionConstraint"><span class="hs-identifier hs-var hs-var">simplifyPackageVersionConstraint</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-type">PackageVersionConstraint</span></a></span><span> </span><span id="local-6989586621679656456"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656456"><span class="hs-identifier hs-var">pn</span></a></span></span><span> </span><span id="local-6989586621679656455"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679656455"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-74"></span><span>    </span><span class="annot"><span class="annottext">PackageName -&gt; VersionRange -&gt; PackageVersionConstraint
</span><a href="Distribution.Types.PackageVersionConstraint.html#PackageVersionConstraint"><span class="hs-identifier hs-var">PackageVersionConstraint</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679656456"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionRange -&gt; VersionRange
</span><a href="Distribution.Version.html#simplifyVersionRange"><span class="hs-identifier hs-var">simplifyVersionRange</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679656455"><span class="hs-identifier hs-var">vr</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-75"></span></pre></body></html>